.class Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;
.super Ljava/lang/Object;
.source "CategoryAppsActivity.java"

# interfaces
.implements Lretrofit/Callback;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/activity/CategoryAppsActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lretrofit/Callback",
        "<",
        "Lorg/json/JSONObject;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;


# direct methods
.method constructor <init>(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)V
    .registers 2
    .param p1, "this$0"    # Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    .prologue
    .line 169
    iput-object p1, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public failure(Lretrofit/RetrofitError;)V
    .registers 4
    .param p1, "error"    # Lretrofit/RetrofitError;

    .prologue
    .line 195
    const-string v0, "ListApps"

    invoke-static {v0, p1}, Lcom/zuiapps/suite/utils/log/LogUtil;->e(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 196
    iget-object v0, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # operator-- for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->currentRequestPage:I
    invoke-static {v0}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$210(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)I

    .line 197
    iget-object v0, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # invokes: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->onRefreshComplete()V
    invoke-static {v0}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$500(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)V

    .line 198
    iget-object v0, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    const/4 v1, 0x0

    # setter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mIsRequesting:Z
    invoke-static {v0, v1}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$402(Lcom/brixd/niceapp/activity/CategoryAppsActivity;Z)Z

    .line 199
    return-void
.end method

.method public bridge synthetic success(Ljava/lang/Object;Lretrofit/client/Response;)V
    .registers 3

    .prologue
    .line 169
    check-cast p1, Lorg/json/JSONObject;

    invoke-virtual {p0, p1, p2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->success(Lorg/json/JSONObject;Lretrofit/client/Response;)V

    return-void
.end method

.method public success(Lorg/json/JSONObject;Lretrofit/client/Response;)V
    .registers 9
    .param p1, "jsonObject"    # Lorg/json/JSONObject;
    .param p2, "response"    # Lretrofit/client/Response;

    .prologue
    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 173
    iget-object v5, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    const-string v2, "has_next"

    invoke-virtual {p1, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    if-eqz v2, :cond_58

    move v2, v3

    :goto_d
    # setter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mHasNext:Z
    invoke-static {v5, v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$002(Lcom/brixd/niceapp/activity/CategoryAppsActivity;Z)Z

    .line 174
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mCategoryModel:Lcom/brixd/niceapp/model/CategoryModel;
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$100(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/model/CategoryModel;

    move-result-object v2

    const-string v5, "apps"

    invoke-virtual {p1, v5}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v5

    invoke-static {v2, v5, v4}, Lcom/brixd/niceapp/model/CategoryAppModel;->parseCategoryAppModel(Lcom/brixd/niceapp/model/CategoryModel;Lorg/json/JSONArray;Z)Ljava/util/ArrayList;

    move-result-object v0

    .line 175
    .local v0, "categoryAppModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/CategoryAppModel;>;"
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->currentRequestPage:I
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$200(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)I

    move-result v2

    if-ne v2, v3, :cond_5a

    .line 176
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mCategoryModel:Lcom/brixd/niceapp/model/CategoryModel;
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$100(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/model/CategoryModel;

    move-result-object v2

    iput-object v0, v2, Lcom/brixd/niceapp/model/CategoryModel;->categoryAppModels:Ljava/util/List;

    .line 184
    :goto_30
    const-class v3, Lcom/brixd/niceapp/activity/fragment/CardViewPagerFragment;

    monitor-enter v3

    .line 185
    :try_start_33
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mAdapter:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryDetailAppListAdapter;
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$300(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/activity/fragment/adapter/CategoryDetailAppListAdapter;

    move-result-object v2

    iget-object v4, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mCategoryModel:Lcom/brixd/niceapp/model/CategoryModel;
    invoke-static {v4}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$100(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/model/CategoryModel;

    move-result-object v4

    invoke-virtual {v2, v4}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryDetailAppListAdapter;->setCategoryList(Lcom/brixd/niceapp/model/CategoryModel;)V

    .line 186
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mAdapter:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryDetailAppListAdapter;
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$300(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/activity/fragment/adapter/CategoryDetailAppListAdapter;

    move-result-object v2

    invoke-virtual {v2}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryDetailAppListAdapter;->notifyDataSetChanged()V

    .line 187
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    const/4 v4, 0x0

    # setter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mIsRequesting:Z
    invoke-static {v2, v4}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$402(Lcom/brixd/niceapp/activity/CategoryAppsActivity;Z)Z

    .line 188
    monitor-exit v3
    :try_end_52
    .catchall {:try_start_33 .. :try_end_52} :catchall_76

    .line 190
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # invokes: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->onRefreshComplete()V
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$500(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)V

    .line 191
    return-void

    .end local v0    # "categoryAppModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/CategoryAppModel;>;"
    :cond_58
    move v2, v4

    .line 173
    goto :goto_d

    .line 178
    .restart local v0    # "categoryAppModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/CategoryAppModel;>;"
    :cond_5a
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 179
    .local v1, "list":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/CategoryAppModel;>;"
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mCategoryModel:Lcom/brixd/niceapp/model/CategoryModel;
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$100(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/model/CategoryModel;

    move-result-object v2

    iget-object v2, v2, Lcom/brixd/niceapp/model/CategoryModel;->categoryAppModels:Ljava/util/List;

    invoke-interface {v1, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 180
    invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 181
    iget-object v2, p0, Lcom/brixd/niceapp/activity/CategoryAppsActivity$3;->this$0:Lcom/brixd/niceapp/activity/CategoryAppsActivity;

    # getter for: Lcom/brixd/niceapp/activity/CategoryAppsActivity;->mCategoryModel:Lcom/brixd/niceapp/model/CategoryModel;
    invoke-static {v2}, Lcom/brixd/niceapp/activity/CategoryAppsActivity;->access$100(Lcom/brixd/niceapp/activity/CategoryAppsActivity;)Lcom/brixd/niceapp/model/CategoryModel;

    move-result-object v2

    iput-object v1, v2, Lcom/brixd/niceapp/model/CategoryModel;->categoryAppModels:Ljava/util/List;

    goto :goto_30

    .line 188
    .end local v1    # "list":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/CategoryAppModel;>;"
    :catchall_76
    move-exception v2

    :try_start_77
    monitor-exit v3
    :try_end_78
    .catchall {:try_start_77 .. :try_end_78} :catchall_76

    throw v2
.end method
